Search API
Search service API Documentation
Paths
/cl/search/api/v1/healthz/
- Method: GET
- Summary: Health
- Description: Return Health Status. :return:
- Operation ID: health_cl_search_api_v1_healthz__get
- Responses:
- 200:
- Description: Successful Response
- Content-Type: application/json
- 200:
Semantic Search API
/cl/search/api/v1/semantic
-
Method:
POST
-
Summary: Semantic Search On Tenant Data
-
Description: Perform a semantic search on tenant data present in the object repository and return a list of matching documents.
-
Operation ID: Semantic_search_on_tenant_data_present_cl_search_api_v1_semantic_post
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Query Parameter | query_string | Query string to search for objects semantically | string | mandatory |
Query Parameter | start | Specifies the page number to retrieve (1-based index) | int | mandatory |
Query Parameter | size | Specifies the number of items per page | int | mandatory |
Query Parameter | min_relevant_score | Minimum relevant score | int | mandatory |
Parameter | tags | List of tags associated with the document | array of strings | mandatory |
Parameter | folders | List of folders where the document is organized | array of strings | mandatory |
Parameter | repos | List of repositories where the document is stored | array of strings | mandatory |
Parameter | kvp | Key-value pairs for additional metadata | object | mandatory |
Parameter | taxonomy | Taxonomy information related to the document | array of objects | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/search/api/v1/semantic"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"query_string":"string",
"start":"int",
"size":"int",
"min_relevant_score":"int",
"tags": [
"string"
],
"folders": [
"string"
],
"repos": [
"string"
],
"kvp": {},
"taxonomy": {}
}
response = requests.post(URL, headers=headers,params=params)
print(response)
Example response -
{
"status": "200",
"message": "Documents found",
"result_count": 0,
"result": [],
"aggregation": {}
}
Responses:
Status Code | Description | Content-Type |
---|---|---|
200 | Documents found | application/json |
400 | Bad Request | application/json |
401 | Unauthorized | application/json |
403 | Forbidden | application/json |
404 | Object not found | application/json |
405 | Method not allowed | application/json |
422 | Unprocessable Entity | application/json |
500 | Internal server error | application/json |
- 200 (Documents found): This response indicates that the semantic search operation was successful, and it returns a list of matching documents.
- 400 (Bad Request): This response indicates that the request was malformed or invalid.
- 401 (Unauthorized): This response indicates that the request lacks valid authentication credentials for the operation.
- 403 (Forbidden): This response indicates that the request is forbidden due to insufficient permissions.
- 404 (Object not found): This response indicates that the requested object or resource was not found.
- 405 (Method not allowed): This response indicates that the HTTP method used is not allowed for this endpoint.
- 422 (Unprocessable Entity): This response indicates that the request was well-formed but unable to be followed due to semantic errors.
- 500 (Internal server error): This response indicates an unexpected server error occurred.
Note: Use this API to perform a semantic search on tenant data present in the object repository. Ensure that the request parameters are correctly formatted and that authentication credentials are provided as required.
Full-Text Search API
/cl/search/api/v1/fulltext
-
Method:
POST
-
Summary: Full-Text Search On Tenant Data
-
Description: Perform a full-text search on tenant data present in the object repository and return a list of matching documents.
-
Operation ID: Full_text_search_on_tenant_data_present_cl_search_api_v1_fulltext_post
Request Payload:
Type | Parameter | Description | Data Type | is_optional |
---|---|---|---|---|
Query Parameter | query_string | Query string to search for objects semantically | string | mandatory |
Query Parameter | start | Specifies the page number to retrieve (1-based index) | string | mandatory |
Query Parameter | size | Specifies the number of items per page | int | mandatory |
Query Parameter | min_relevant_score | Minimum relevant score | int | mandatory |
Parameter | tags | List of tags associated with the document | list | mandatory |
Parameter | folders | List of folders where the document is organized | list | mandatory |
Parameter | repos | List of repositories where the document is stored | list | mandatory |
Parameter | kvp | Key-value pairs for additional metadata | list | mandatory |
Parameter | taxonomy | Taxonomy information related to the document | list | mandatory |
sample code
import requests
URL = "https://api.kadal.ai/cl/search/api/v1/fulltext"
# sample python code
headers = { "Authorization ": "Bearer 1234567890" }
params={
"query_string":"string",
"start":"int",
"size":"int",
"min_relevant_score":"int",
"tags": [
"string"
],
"folders": [
"string"
],
"repos": [
"string"
],
"kvp": "list",
"taxonomy": "list",
}
response = requests.post(URL, headers=headers,params=params)
print(response)